package com.irdstudio.apicenter.console.service.authenticate;

import java.sql.SQLException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.irdstudio.apicenter.console.dm.AppCommodityShow;
import com.irdstudio.apicenter.console.dm.AppCommodityShowDao;

@Service(value = "appCommodityShowService")
public class AppCommodityShowService {

	@Autowired
	private AppCommodityShowDao appCommodityShowDao;

	public int insertOne(AppCommodityShow appCommodityShow) throws SQLException,
			ClassNotFoundException {
		return appCommodityShowDao.save(appCommodityShow);
	}

	public AppCommodityShow queryAppTradePrivate(String key, String appid) throws SQLException {
		return appCommodityShowDao.queryWithKeys(key, appid);
	}

	public int update(AppCommodityShow appCommodityShow) throws SQLException,
			ClassNotFoundException {
		return appCommodityShowDao.update(appCommodityShow);
	}

	public int delete(String appid, String recordKey) throws SQLException,
			ClassNotFoundException {
		return appCommodityShowDao.delete(appid, recordKey);
	}

}